package com.example.web.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import com.example.web.entity.Student;

/**
 * 消费者
 * @author yzl
 *
 */
@Component
@Slf4j
public class QueueAddFriendReceiver {
    @JmsListener(destination = "QUEUE_RECEIVE_ADD_FIREND", containerFactory = "MyjmsQueueListener") //红色为监听的队列名称
    public void receiveAddFriend(Student student) {
        System.out.println("啦啦啦啦"+student.toString());
                log.error("receiveAddFriend Exception:{}");
    }
    
}
